import React, { Component } from 'react'
import { Layout, Button, Form, Input, Image, Row, Col } from 'antd';
import PubSub from 'pubsub-js'
import TextArea from 'antd/lib/input/TextArea';
const { Header, Footer, Sider, Content } = Layout;
const itemStyle = { width: 100, height: 60, fontSize: 20, TextAlign: 'center', border: '2px dashed #ccc', margin: '1px', padding: '1px', boxShadow: '0 0 #ccc' };
const itemtextStyle = { fontSize: 20, TextAlign: 'center', fontFamily: "黑体" };
export default class P2PBottomInput extends Component {
    state = {
        xres: 0,
        yres: 0
    }
    componentDidMount() {
        var x = window.screen.width * window.devicePixelRatio
        var y = window.screen.height * window.devicePixelRatio
        console.log("分辨率: " + x + " X " + y);
        console.log('width:', x - x * 0.3)
        this.setState({ xres: x, yres: y });
    }
    render() {
        const { xres } = this.state
        return (
            <Footer style={{
                padding: 0,
                margin: 0,
                minHeight: 200,
                backgroundColor: 'white'
            }}>
                <Form layout="inline" style={{
                    padding: 0,
                    margin: 0,
                    minHeight: 150,
                    backgroundColor: 'white'
                }}>
                    <Form.Item >
                        <TextArea placeholder="" style={{ width: xres - xres * 0.3, height: 100, fontSize: 24 }}>
                        </TextArea>
                    </Form.Item>
                    <Form.Item>
                        <Button style={{ width: 150, height: 100 }}><h2>发送</h2></Button>
                    </Form.Item>
                </Form>
            </Footer>
        )
    }
}
